<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>新订单管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/mer/merOrder/">订单列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="merOrder" action="${ctx}/mer/merOrder/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		
		<ul class="ul-form">
			<li><label>微信昵称：</label>
				<form:input path="customer.nickname" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>订单号：</label>
				<form:input path="id" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>订单类型：</label>
					<form:select path="isPhoto" class="input-medium">
					<form:option value="" label="请选择"/>
					<form:options items="${fns:getDictList('productclassify')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>支付结果：</label>
					<form:select path="status" class="input-medium">
					<form:option value="" label="请选择"/>
					<form:options items="${fns:getDictList('order_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<!-- <th>订单编号</th> -->
				<th>用户</th>
				<th>提交时间</th>
				<th>付款时间</th>
				<th>总价</th>
				<th>订单类型</th>
				<th>收件人</th>
				<th>收件人电话</th>
				<th>收件人地址</th>
				<th>状态</th>
				<shiro:hasPermission name="mer:merOrder:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="merOrder">
			<tr>
				<%-- <td><a href="${ctx}/mer/merOrder/form?id=${merOrder.id}">
					${merOrder.id}
					</a>
				</td> --%>
				<td>
					${merOrder.customer.nickname}
				</td>
				
				<td>
					<fmt:formatDate value="${merOrder.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					<fmt:formatDate value="${merOrder.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${merOrder.currentPrice}
				</td>
				<td>
					${fns:getDictLabel(merOrder.isPhoto,'productclassify','其他')}
				</td>
				<td>
					${merOrder.recipientName}
				</td>
				<td>
					${merOrder.recipientMobile}
				</td>
				<td>
					${merOrder.recipientProvince},${merOrder.recipientCity},${merOrder.recipientCounty},${merOrder.recipientAddress}
				</td>
				<td>
					${fns:getDictLabel(merOrder.status,'order_status','其他')}
				</td>
				<shiro:hasPermission name="mer:merOrder:edit"><td>
    				<a href="${ctx}/mer/merOrder/form?id=${merOrder.id}">修改</a>
					<%-- <a href="${ctx}/mer/merOrder/delete?id=${merOrder.id}" onclick="return confirmx('确认要删除该新订单吗？', this.href)">删除</a> --%>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>